<!DOCTYPE html>
<!--
Copyright (c) 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel="import" href="/tracing/extras/chrome/cc/picture.html">
<link rel="import" href="/tracing/model/object_instance.html">

<script>
'use strict';

tr.exportTo('tr.e.cc', function() {
  const ObjectSnapshot = tr.model.ObjectSnapshot;

  function DisplayItemList(skp64, layerRect) {
    tr.e.cc.Picture.apply(this, arguments);
  }

  DisplayItemList.prototype = {
    __proto__: tr.e.cc.Picture.prototype
  };

  /**
   * @constructor
   */
  function DisplayItemListSnapshot() {
    tr.e.cc.PictureSnapshot.apply(this, arguments);
  }

  DisplayItemListSnapshot.prototype = {
    __proto__: tr.e.cc.PictureSnapshot.prototype,

    initialize() {
      tr.e.cc.PictureSnapshot.prototype.initialize.call(this);
      this.displayItems_ = this.args.params.items;
    },

    get items() {
      return this.displayItems_;
    }
  };

  ObjectSnapshot.subTypes.register(
      DisplayItemListSnapshot,
      {typeNames: ['cc::DisplayItemList']});

  return {
    DisplayItemListSnapshot,
    DisplayItemList,
  };
});
</script>
